package wang.jinggo.util;


/**
 * id生成工具类
 * @author yusx
 * @date 2018-10-19
 */
public class IdUtil {

	private static final SnowFlake snowFlake;

	static {
		snowFlake = new SnowFlake(0, 10);
	}

	public static Long generateId(){
		return snowFlake.nextId();
	}

	public static void main(String[] args){
		for (int i=0; i<100; i++) {
			System.out.println(IdUtil.generateId());
		}
	}
}
